s2 = csv_stringclean(s2, ",\t\r\n");
}
- if (s2.isEmpty()) {
+ if (sout.isEmpty()) {
sout = QString("%1,%2,@,0").arg(s1).arg(s1);
} else {
sout = QString("%1,%2,@,0").arg(s1).arg(s2);
compegps_parse_time(c, &tm);
wpt->SetCreationTime(mkgmtime(&tm));
}
+ break;
case 6:
wpt->altitude = atof(c);
break;
wp_flags() :
shortname_is_synthetic(0),
cet_converted(0),
- fmt_use(0),
+ fmt_use(1),
temperature(0),
proximity(0),
course(0),
int32_t ux;
route_head* track;
int i;
- int datum;
u1 = gbfgetint16(fin);
}
tcount = gbfgetint32(fin);
+ int datum = 118;
if (tcount > 0) {
datum = read_datum(fin);
if (version == 8) {
wpt->longitude = gbfgetdbl(fin);
wpt->altitude = gbfgetdbl(fin);
+ if (datum < 0) {
+ fatal(MYNAME ": Invalid datum %d found", datum);
+ }
convert_datum(wpt, datum);
track_add_wpt(track, wpt);
case 0x8000b: /* address (street/city...) */
(void) gbfgetint32(fin);
+ // FALLTHROUGH
case 0xb: /* as seen in German POI files. */
PP;
mask = gbfgetint16(fin); /* address fields mask */
case 109:
case 110:
return display_mode & 3;
+ break;
case 104:
switch (display_mode) {
case 0:
return 0;
}
}
- return 0;
}
double phi, lambda, alt, a, b;
int32 datum = GPS_Lookup_Datum_Index("Palestine 1923");
+ if (datum < 0) {
+ fatal("Unable to find Palestine 1923 in internal tables");
+ }
int32 ellipse = GPS_Datum[datum].ellipse;
a = GPS_Ellipse[ellipse].a;
double const N0 = 1126867.909;
double phi, lambda, alt, a, b;
int32 datum = GPS_Lookup_Datum_Index("Palestine 1923");
+ if (datum < 0) {
+ fatal("Unable to find Palestine 1923 in internal tables");
+ }
int32 ellipse = GPS_Datum[datum].ellipse;
a = GPS_Ellipse[ellipse].a;
static void
trackfilter_pack_init_rte_name(route_head* track, const time_t default_time)
{
- char buff[128];
-
if (strchr(opt_title, '%') != NULL) {
struct tm tm;
Waypoint* wpt;
time_t t = wpt->GetCreationTime().toTime_t();
tm = *localtime(&t);
}
+ char buff[128];
strftime(buff, sizeof(buff), opt_title, &tm);
+ track->rte_name = buff;
} else {
- strncpy(buff, opt_title, sizeof(buff));
+ track->rte_name = opt_title;
}
- track->rte_name = buff;
}
/*******************************************************************************